#define _CRT_SECURE_NO_WARNINGS 1

#include"2411_18.h"

void TestLTNode()
{
	LTNode* plist = LTInitList();
	LTPrintList(plist);

	LTPushBack(plist, 1);
	LTPushBack(plist, 2);
	LTPushBack(plist, 3);
	LTPushBack(plist, 4);
	LTPrintList(plist);

	LTPopBack(plist);
	LTPopBack(plist);
	LTPrintList(plist);

	LTPushFront(plist, 1);
	LTPushFront(plist, 2);
	LTPushFront(plist, 3);
	LTPushFront(plist, 4);
	LTPrintList(plist);
	
	LTPopFront(plist);
	LTPopFront(plist);
	LTPopFront(plist);
	LTPrintList(plist);

	LTNode* pos = LTFindNode(plist, 1);
	LTErase(pos);
	LTPrintList(plist);

	LTNode* prev = LTFindNode(plist, 2);
	LTInsert(prev, 4);
	LTPrintList(plist);

	LTDestroy(plist);
	plist = NULL;
	LTPrintList(plist);

}
int main()
{
	TestLTNode();
	return 0;
}